﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Collections.ObjectModel;

namespace PSE.Framework.Process
{
    public class HierarchicalProcessCollection<T> : ReadOnlyObservableCollection<T>
        where T : IHierarchicalProcess
    {
        public HierarchicalProcessCollection(ObservableCollection<T> list)
            : base(list)
        {
        }

        public T this[string name]
        {
            get { return this.Items.FirstOrDefault(p => p.Name == name); }
        }
    }
}
